package com.yanqu.road.entity.activity.operamask.game;

import com.alibaba.fastjson.annotation.JSONField;

public class OperaMaskBlock {

    private int x;
    private int y;
    private int color; // 颜色：0无 1绿 2橙 3红 4蓝 5紫 6黄
    private int type; // eOperaMaskBlockType

    private int mul = 1; // 技能19积分倍数
    private int mul15 = 1; // 技能15积分倍数
    private int mul20 = 1; // 技能20积分倍数
    private int mul22 = 1; // 技能22的倍数

    @JSONField(serialize = false)
    private int score;

    @JSONField(serialize = false)
    private int selfBoom = 0; // 0没有，1需要自爆，2自爆过了

    public OperaMaskBlock() {
    }

    public OperaMaskBlock(int x, int y, int color, int type) {
        this.x = x;
        this.y = y;
        this.color = color;
        this.type = type;
    }

    public OperaMaskBlock clone() {
        OperaMaskBlock data = new OperaMaskBlock(getX(), getY(), getColor(), getType());
        data.setSelfBoom(getSelfBoom());
        data.setMul(getMul());
        data.setMul15(getMul15());
        data.setMul20(getMul20());
        data.setMul22(getMul22());
        return data;
    }

    public OperaMaskBlock cloneNoMulti() {
        OperaMaskBlock data = new OperaMaskBlock(getX(), getY(), getColor(), getType());
        data.setSelfBoom(getSelfBoom());
        return data;
    }

    // ======================================================

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getSelfBoom() {
        return selfBoom;
    }

    public void setSelfBoom(int selfBoom) {
        this.selfBoom = selfBoom;
    }

    public int getMul() {
        return mul;
    }

    public void setMul(int mul) {
        this.mul = mul;
    }

    public int getMul15() {
        return mul15;
    }

    public void setMul15(int mul15) {
        this.mul15 = mul15;
    }

    public int getMul20() {
        return mul20;
    }

    public void setMul20(int mul20) {
        this.mul20 = mul20;
    }

    public int getMul22() {
        return mul22;
    }

    public void setMul22(int mul22) {
        this.mul22 = mul22;
    }

    public int getTotalMul() {
        return getMul() + getMul15() + getMul20() + getMul22() - 3;
    }

    public void ResetTotalMul() {
        this.mul = 1;
        this.mul15 = 1;
        this.mul20 = 1;
        this.mul22 = 1;
    }
}
